package com.wxmit.module.system.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.wxmit.module.system.domain.SysUser;
import com.wxmit.module.system.domain.vo.SysUserVO;
import com.wxmit.system.base.core.ShushanBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Description SysUserMapper
 * @Author huangxiong
 * @Date 2022/7/11 14:39
 * @Version V1.0
 */
@Mapper
public interface SysUserMapper extends ShushanBaseMapper<SysUserMapper,SysUser> {

    @InterceptorIgnore
    SysUser getUserByUserName(@Param("userName") String userName);

    @InterceptorIgnore
    SysUserVO getUserInfo(@Param("userId") Long userId);

    @InterceptorIgnore
    SysUser getInfo(@Param("id") Long id);

    /**
     *  增加用户登录错误次数
     * @param id 用户id
     * @param ban 是否封禁
     */
    void increaseLoginErr(@Param("userId") Long id,@Param("ban") String ban);


    void clearUpAllLoginErr();

    void clearUpLoginErr(@Param("userId") Long id);
}
